package com.zzedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzedu.domain.ZzSchoolCourse;
import com.zzedu.dto.ZzSchoolCourseDTO;
import com.zzedu.mapper.ZzSchoolCourseMapper;
import com.zzedu.service.IZzSchoolCourseService;
import org.springframework.stereotype.Service;
/**
 * 学校解锁记录Service业务层处理
 * 
 * @author Mr.Wang
 * @date 2025-08-30
 */
@Service
public class ZzSchoolCourseServiceImpl extends ServiceImpl<ZzSchoolCourseMapper, ZzSchoolCourse> implements IZzSchoolCourseService
{

    @Override
    public LambdaQueryWrapper<ZzSchoolCourse> buildQuery(ZzSchoolCourseDTO zzClassesSendSchool) {
        LambdaQueryWrapper<ZzSchoolCourse> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getSchoolId(), ZzSchoolCourse::getSchoolId, zzClassesSendSchool.getSchoolId());
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getUnitId(), ZzSchoolCourse::getUnitId, zzClassesSendSchool.getUnitId());
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getUnLockDate(), ZzSchoolCourse::getUnLockDate, zzClassesSendSchool.getUnLockDate());
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getGmtCreate(), ZzSchoolCourse::getGmtCreate, zzClassesSendSchool.getGmtCreate());
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getGmtModify(), ZzSchoolCourse::getGmtModify, zzClassesSendSchool.getGmtModify());
        lambdaQueryWrapper.eq(null!=zzClassesSendSchool.getDeleted(), ZzSchoolCourse::getDeleted, zzClassesSendSchool.getDeleted());

        lambdaQueryWrapper.orderByAsc(ZzSchoolCourse::getId);
        return lambdaQueryWrapper;
    }
}